home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / frio / r3raysmp.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  7.3 KB  |  226 lines

  1.  
  2. // JavaScript wrapper for r3raysmp.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_RAYSAMPLE_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_RAYSAMPLE = 325;
  11.  
  12.  
  13.  
  14.  
  15. // Description: resets the channel data to zero
  16.  
  17. R3RAYSMPM_INITIALIZE = 325000;
  18.  
  19. function mR3RAYSMPM_INITIALIZE() {
  20.   DoA(this.r3obj, 325000, 0, R3TID_INTEGER, 0);
  21. }
  22.  
  23. // Description: adds to a new channel to a raysample instance. If a channel with the
  24. //      given name already exists, no actions take place.
  25. // p1: Integer, class id of channel
  26. // p3: Integer, unique name of the channel.    
  27.  
  28. R3RAYSMPM_ADDCHANNEL = 325001;
  29.  
  30. function mR3RAYSMPM_ADDCHANNEL(p1, p3) {
  31.   DoA2(this.r3obj, 325001, p1, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  32. }
  33.  
  34. // Description: removes all added dynamic channels from a raysample.
  35.  
  36. R3RAYSMPM_REMOVEDYNAMICCHANN = 325002;
  37.  
  38. function mR3RAYSMPM_REMOVEDYNAMICCHANN() {
  39.   DoA(this.r3obj, 325002, 0, R3TID_INTEGER, 0);
  40. }
  41.  
  42. // Description: returns the storage offset of a given channel. This offset can be used    * together
  43. //      with the macro R3CHADDR(raysmp, storage_offset) to find out the memory    * address of the channel data.
  44. // p3: String, name of the channel    
  45.  
  46. R3RAYSMPM_NAMETOINDEX = 325003;
  47.  
  48. function mR3RAYSMPM_NAMETOINDEX(p3) {
  49.   DoA(this.r3obj, 325003, p3, R3TID_STRING, 0);
  50. }
  51.  
  52. // Description: returns the clid of a given channel name.
  53. // Returns: Integer, channel class identifier (NULL if not found)
  54. // p3: String, channel name    
  55.  
  56. R3RAYSMPM_NAMETOCLID = 325004;
  57.  
  58. function mR3RAYSMPM_NAMETOCLID(p3) {
  59.   return   DoA(this.r3obj, 325004, p3, R3TID_STRING, 0);
  60. }
  61.  
  62. // Description: Read the contents of the given channel. The caller must allocate    * wide enough buffer
  63. //      for storing tchannel data. The method is suitable for static channels * because the channel
  64. //      is identified by a clid. See also R3RAYSMPM_GETCHANNELVALUEBYNAME below.
  65. // p1: Integer, clid of the channel
  66. // p3: Object, the address to which the channel data is copied.
  67.  
  68. R3RAYSMPM_GETCHANNELVALUE = 325005;
  69.  
  70. function mR3RAYSMPM_GETCHANNELVALUE(p1, p3) {
  71.   DoA2(this.r3obj, 325005, p1, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  72. }
  73.  
  74. // Description: Sets the contents of the given (static) channel in a raysample.
  75. // p1: Integer, clid of the channel
  76. // p3: Object, the address from which the channel data is copied.
  77.  
  78. R3RAYSMPM_SETCHANNELVALUE = 325006;
  79.  
  80. function mR3RAYSMPM_SETCHANNELVALUE(p1, p3) {
  81.   DoA2(this.r3obj, 325006, p1, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  82. }
  83.  
  84. // Description: Read the contents of the given channel. The caller must allocate    * wide enough buffer
  85. //      for storing tchannel data.
  86. // p1: String, name of the channel
  87. // p3: Object, the address to which the channel data is copied.
  88.  
  89. R3RAYSMPM_GETCHANNELVALUEBYN = 325007;
  90.  
  91. function mR3RAYSMPM_GETCHANNELVALUEBYN(p1, p3) {
  92.   DoA2(this.r3obj, 325007, p1, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
  93. }
  94.  
  95. // Description: Sets the contents of the given channel in a raysample.
  96. // p1: String, name of the channel
  97. // p3: Object, the address from which the channel data is copied.
  98.  
  99. R3RAYSMPM_SETCHANNELVALUEBYN = 325008;
  100.  
  101. function mR3RAYSMPM_SETCHANNELVALUEBYN(p1, p3) {
  102.   DoA2(this.r3obj, 325008, p1, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
  103. }
  104.  
  105. // Description: Copies the channel data of a raysample to another raysample.    * The caller is rensponsible
  106. //      for passing two identically configured raysamples. * Different width or channel set (not examined for
  107. //      speed reasons) may result to system failure.
  108. // p3: Object, the sample from which data is copied
  109.  
  110. R3RAYSMPM_ASSIGN = 325009;
  111.  
  112. function mR3RAYSMPM_ASSIGN(p3) {
  113.   DoA(this.r3obj, 325009, p3, R3TID_OBJECT, 0);
  114. }
  115.  
  116. // Description: Allocates channel data. Raysample channels can be read and written after this. * Do
  117. //      not change width or channel configuration between BEGIN-END pair.
  118.  
  119. R3RAYSMPM_BEGIN = 325010;
  120.  
  121. function mR3RAYSMPM_BEGIN() {
  122.   DoA(this.r3obj, 325010, 0, R3TID_INTEGER, 0);
  123. }
  124.  
  125. // Description: Frees channel data.
  126.  
  127. R3RAYSMPM_END = 325011;
  128.  
  129. function mR3RAYSMPM_END() {
  130.   DoA(this.r3obj, 325011, 0, R3TID_INTEGER, 0);
  131. }
  132.  
  133. // Description: installs a new static channel to the raysample class. If it already was installled,    *
  134. //      actions take place. This method should be called only during class installation (at program    * configuration
  135. //      time) because some modules rely on fixed static channel indices.
  136. // p3: Integer, clid of the channel (of base class R3CLID_CHANNEL) to be installed    
  137.  
  138. R3RAYSMPCM_INSTALLCHANNEL = 325012;
  139.  
  140. function mR3RAYSMPCM_INSTALLCHANNEL(p3) {
  141.   DoA(this.r3obj, 325012, p3, R3TID_INTEGER, 0);
  142. }
  143.  
  144. // Description: Does R3SendMsg3(p1, msg, channeldatatype, channelclid, * R3RCA_Name, channelname, * R3CHCA_SubCount, channelsubcount, * R3CHCA_SubIds, channelsubidarray,
  145. //      R3CHCA_SubNames, channelsubnamearray, * R3TAG_END); * * for all installed static channels *
  146. // p1: Object, object to be called
  147. // p3: Integer, callback method    
  148.  
  149. R3RAYSMPCM_ENUMSTATICCHANNEL = 325013;
  150.  
  151. function mR3RAYSMPCM_ENUMSTATICCHANNEL(p1, p3) {
  152.   DoA2(this.r3obj, 325013, p1, R3TID_OBJECT, 0, p3, R3TID_INTEGER, 0);
  153. }
  154.  
  155. // Description: returns the storage offset of a given static channel. This offset can be used    *
  156. //      together with the macro R3CHADDR(raysmp, channel_index) to find out the memory    * address of the channel
  157. //      data.
  158. // p3: Integer, class id of the channel    
  159.  
  160. R3RAYSMPCM_GETCHANNELINDEX = 325014;
  161.  
  162. function mR3RAYSMPCM_GETCHANNELINDEX(p3) {
  163.   DoA(this.r3obj, 325014, p3, R3TID_INTEGER, 0);
  164. }
  165.  
  166. // Description: returns the clid of a given static channel name.
  167. // Returns: Integer, channel class identifier (NULL if not found)
  168. // p3: String, channel name    
  169.  
  170. R3RAYSMPCM_NAMETOSTATICCLID = 325015;
  171.  
  172. function mR3RAYSMPCM_NAMETOSTATICCLID(p3) {
  173.   return   DoA(this.r3obj, 325015, p3, R3TID_STRING, 0);
  174. }
  175.  
  176.  
  177.  
  178.  
  179. R3RAYSMPA_Width = 325500;
  180. function SetR3RAYSMPA_Width(value) {
  181.   R3Set(this.r3obj, R3RAYSMPA_Width, value, R3TID_INTEGER, 0); 
  182. }
  183.  
  184. function GetR3RAYSMPA_Width() {
  185.   return R3Get(this.r3obj, R3RAYSMPA_Width, R3TID_INTEGER, 0); 
  186. }
  187.  
  188. R3RAYSMPA_ChannelCount = 325501;
  189. function GetR3RAYSMPA_ChannelCount() {
  190.   return R3Get(this.r3obj, R3RAYSMPA_ChannelCount, R3TID_INTEGER, 0); 
  191. }
  192.  
  193. var R3RAYSMPA_NoStaticChannels = 325504; // Boolean
  194.  
  195.  
  196. function r3Raysample () { 
  197.    this.base = r3God;
  198.    if(arguments.length) {
  199.       this.base(R3CLID_RAYSAMPLE, arguments);
  200.    }
  201.    // Methods
  202.    this.INITIALIZE=mR3RAYSMPM_INITIALIZE;
  203.    this.ADDCHANNEL=mR3RAYSMPM_ADDCHANNEL;
  204.    this.REMOVEDYNAMICCHANN=mR3RAYSMPM_REMOVEDYNAMICCHANN;
  205.    this.NAMETOINDEX=mR3RAYSMPM_NAMETOINDEX;
  206.    this.NAMETOCLID=mR3RAYSMPM_NAMETOCLID;
  207.    this.GETCHANNELVALUE=mR3RAYSMPM_GETCHANNELVALUE;
  208.    this.SETCHANNELVALUE=mR3RAYSMPM_SETCHANNELVALUE;
  209.    this.GETCHANNELVALUEBYN=mR3RAYSMPM_GETCHANNELVALUEBYN;
  210.    this.SETCHANNELVALUEBYN=mR3RAYSMPM_SETCHANNELVALUEBYN;
  211.    this.ASSIGN=mR3RAYSMPM_ASSIGN;
  212.    this.BEGIN=mR3RAYSMPM_BEGIN;
  213.    this.END=mR3RAYSMPM_END;
  214.    this.INSTALLCHANNEL=mR3RAYSMPCM_INSTALLCHANNEL;
  215.    this.ENUMSTATICCHANNEL=mR3RAYSMPCM_ENUMSTATICCHANNEL;
  216.    this.GETCHANNELINDEX=mR3RAYSMPCM_GETCHANNELINDEX;
  217.    this.NAMETOSTATICCLID=mR3RAYSMPCM_NAMETOSTATICCLID;
  218.  
  219.    // Attributes
  220.    this.GetWidth=GetR3RAYSMPA_Width;
  221.    this.SetWidth=SetR3RAYSMPA_Width;
  222.    this.GetChannelCount=GetR3RAYSMPA_ChannelCount;
  223. }
  224.  
  225. r3Raysample.prototype=new r3Root;
  226. // r3raysmp.h_H